package edu.xjdx.os.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

/**
 * 自动生成主键
 */
public class IDGenerator {

    private static SimpleDateFormat df= new SimpleDateFormat("yyMMddHH");
    public  static String getId(){
        return df.format(new Date())+"-"+UUID.randomUUID().toString().replace("-","").substring(9);
    }

}
